<!-- $Id: order_info.htm 15544 2009-01-09 01:54:28Z zblikai $ -->

{include file="pageheader.htm"}
{insert_scripts files="topbar.js,../js/utils.js,listtable.js,selectzone.js,../js/common.js"}
  




  <div class="list-div" style="width:700px;margin:auto">
    <div class="title">售后商品</div>
    <table cellpadding="3" cellspacing="1">
        <tbody>
          <tr>
            <th scope="col" width="180">商品名称</th>
            <th scope="col" width="80">属性</th>
            <th scope="col">数量</th>
            <th scope="col">价格</th>
          </tr>
          {foreach from = $sale_info.goods item = order_goods}
          <tr>
            <td align="center">{$order_goods.goods_name}</td>
            <td align="center">{$order_goods.goods_attr}</td>
            <td align="center">{$order_goods.goods_number}</td>
            <td align="center">{$order_goods.goods_price}</td>
          </tr>
          {/foreach}
        </tbody>
    </table>  
    <div class="title">售后信息</div>
     <table cellpadding="3" cellspacing="1">
        <tbody>
          <tr>
            <th scope="col" width="180">订单ID</th>
            <td align="center">{$sale_info.order_sn}</td>
          </tr>
          <tr>
            <th scope="col" width="180">售后问题</th>
            <td align="center">{$lang.ty.$sale_info.service_type}</td>
          </tr>
          <tr>
            <th scope="col" width="180">处理方式</th>
            <td align="center"><span style="color: red;">{$lang.handle_type.$sale_info.handle_type}</span>
            {if $sale_info.service_state eq 1}
            <select name="handle_state" id ="handle_type">
            <option value="1" {if $sale_info.handle_type eq 1} selected="ture"{/if}>退款不退货</option>
            <option value="2" {if $sale_info.handle_type eq 2} selected="ture"{/if}>退款退货</option>
            </select>
            <span class="button" onclick ="change_type();">修改</span>
            {/if}
            </td>
          </tr>
          <tr>
            <th scope="col" width="180">退款金额</th>
            <td align="center">{$sale_info.refund_money}</td>
          </tr>
          <tr>
            <th scope="col" width="180">联系人</th>
            <td align="center">{$sale_info.consignee}</td>
          </tr>
          <tr>
            <th scope="col" width="180">联系电话</th>
            <td align="center">{$sale_info.mobile}</td>
          </tr>
          <tr>
            <th scope="col" width="180">支付宝账号</th>
            <td align="center">{$sale_info.payment_num}</td>
          </tr>
          {if $sale_info.pic_1}
          <tr>
            <th align="center">图片资料</th>
            <td><img src="/{$sale_info.pic_1}" alt=""></td>
          </tr>
          {/if}
          {if $sale_info.pic_2}
          <tr>
            <th align="center">图片资料</th>
            <td><img src="/{$sale_info.pic_2}" alt=""></td>
          </tr>
          {/if}          
          {if $sale_info.pic_3}
          <tr>
            <th align="center">图片资料</th>
            <td><img src="/{$sale_info.pic_3}" alt=""></td>
          </tr>
          {/if}




        </tbody>
    </table>

    {if $sale_info.service_state eq 1}
    <div class="title">当前可执行操作</div>
    <table cellpadding="3" cellspacing="1">
      <form action="sale.php" method="post" onsubmit="return submit_service_form();" name="service_form">
        <tbody>

          
          <tr>
            <td align="center">操作备注：</td>
            <td align="left"><textarea name="content" id="" cols="30" rows="10" style="width:100%" value="{$content}">{$content}</textarea></td>
          </tr>
          <tr>
            <td align="left">
              <input type="hidden" name="service_type" value="{$sale_info.service_type}">
              <input type="hidden" name="handle_type" value="{$sale_info.handle_type}">
              <input type="hidden" name="act" value="handle">
              <input type="hidden" name="service_id" value="{$sale_info.service_id}">
              <input name="confirm" type="submit" value="通过审核" class="button">
              <input name="cancel" type="submit" value="驳回审核" class="button">


            </td>
          </tr>
        </tbody>
      </form>
    </table>
    {/if}
{if $sale_info.service_state eq 2}
      <div class="title">当前可执行操作</div>
    <table cellpadding="3" cellspacing="1">
      <form action="sale.php" method="post" onsubmit="return submit_service_form();" name="service_form">
        <tbody>

          
          <tr>
            <td align="center">退款金额：</td>
            <td align="left"><input type="text" name="refund_money"><input name="refund" type="submit" value="退运费" class="button"></td>
          </tr>
          <tr>
            <td align="center "  colspan='2'>
              <input type="hidden" name="service_type" value="{$sale_info.service_type}">
              <input type="hidden" name="handle_type" value="{$sale_info.handle_type}">
              <input type="hidden" name="act" value="handle">
              <input type="hidden" name="service_id" value="{$sale_info.service_id}">
              
            </td>
          </tr>
        </tbody>
      </form>
    </table>
{/if}
{if $refund_list}
        <div class="title">退款单</div>
    <table cellpadding="3" cellspacing="1" width="100%">
        <tbody>
          <tr>
              <th>订单号</th>
          
              <th>退款金额</th>
              <th>申请时间</th>
              <th>退款时间</th>
              <th>退款状态</th>
              <th>退款类型</th>
              <th>操作</th>
          </tr>
            {foreach from = $refund_list item = refund} 
          <tr>
            <td align="center">{$refund.order_sn}</td>

            <td align="center">{$refund.refund_money}</td>
            <td align="center">{$refund.add_time}</td>
            <td align="center">{$refund.confirm_time}</td>
            <td align="center">{$lang[rt][$refund.refund_stat]}</td>
            <td align="center">{$lang.refund_type.$refund.refund_type}</td>
            <td>{if $refund.refund_stat eq 1}<a href="refund.php?act=confirm_refund&refund_id={$refund.refund_id}">确认退款</a><a href="javascript:chang_refund({$refund.refund_id});" style="float: right">修改退款金额</a>{/if }</td>
          </tr>
            {/foreach}
        </tbody>
    </table>
    <div id="change_refund" style="display: none">
      <div class="title">修改退款金额操作</div>
      <table cellpadding="3" cellspacing="1">
        <form action="refund.php?act=change_refund" method="post"  name="refund_form">
          <tbody>

            
            <tr>
              <td align="center">操作备注：</td>
              <td align="left"><textarea name="content" id="" cols="30" rows="10" style="width:100%" value="{$content}"></textarea></td>
            </tr>
            <tr>
              <td align="left" colspan="2">

                
                修改金额
                <input type="text"   name="refund_money">
                <input type="hidden" name="act" value="changge_refund">
                <input type="hidden" name="refund_id" value="" id="refund_id">
                <input name="cancel" type="submit" value="确认修改" class="button">
                

              </td>
            </tr>
          </tbody>
        </form>
      </table>
    </div>
<script>
  function chang_refund(refund_id){

    document.getElementById("refund_id").value=refund_id;
    document.getElementById("change_refund").style.display="block";




  }
</script>



{/if}
      <div class="title">操作记录</div>
    <table cellpadding="3" cellspacing="1">
        <tbody>
          <tr>
            <th scope="col" width="180">操作人员</th>
            <th scope="col" width="250">操作内容</th>
            <th scope="col" width="110">操作时间</th>
          </tr>
          {foreach from = $sale_info.handle_record item = handle_record}
          <tr>
            <td align="center">{$handle_record.handle_user}</td>
            <td align="left">{$handle_record.content}</td>
            <td align="center">{$handle_record.add_time}</td>
          </tr>
          {/foreach}
        </tbody>
    </table>
{if $sale_info.service_state neq 3}
<div class="title">取消售后</div>
    <table cellpadding="3" cellspacing="1">
      <form action="sale.php" method="post" onsubmit="return submit_service_form();" name="service_form">
        <tbody>

          
          <tr>
            <td align="center">操作备注：</td>
            <td align="left"><textarea name="content" id="" cols="30" rows="10" style="width:100%" value="{$content}">【标题】客服已经取消了申请 <br/>
</textarea></td>
          </tr>
          <tr>
            <td align="left">
              <input type="hidden" name="service_type" value="{$sale_info.service_type}">
              <input type="hidden" name="handle_type" value="{$sale_info.handle_type}">
              <input type="hidden" name="act" value="handle">
              <input type="hidden" name="service_id" value="{$sale_info.service_id}">
              <input name="cancel_sale" type="submit" value="取消售后" class="button">
             


            </td>
          </tr>
        </tbody>
      </form>
    </table>
{/if}




 </div>
    



{include file="pagefooter.htm"}


<script>
/*AJAX修改处理方式*/
  function change_type(){
    var url ="sale.php?act=change&step=handle_type&service_id={$sale_info.service_id}";
    var handle_type = document.getElementById("handle_type").value;

      Ajax.call(url, 'handle_type='+handle_type, function(obj){
      location.reload();
      }, 'POST', 'JSON');
  }
</script>